package org.example.basic.day02;

import lombok.Data;

public class Demo08练习 {
    public static void main(String[] args) {
        methond(new LawyerInfo());
        methond(new User());
    }
    public static void methond(SysUser sysUser){
        if(sysUser instanceof LawyerInfo){
            LawyerInfo lawyerInfo = (LawyerInfo) sysUser;
            lawyerInfo.login();
            lawyerInfo.发布案源();
        }
        if (sysUser instanceof User){
            User user = (User) sysUser;
            user.login();
        }
    }
}

abstract class SysUser{
    private long id;
    private String avatar;
    private String userName_;
    private String password_;
    private String phone_;
    private Integer sex;
    public abstract void login();
    public void logout(){
        System.out.println("PC退出方法");
    }
}
class LawyerInfo extends SysUser{
    private String IdCard;
    private int ZYYear;
    @Override
    public void login(){
        System.out.println("微信一键登录方法");
    }

    public void 发布案源(){
        System.out.println("发布案源");
    }
}
class User extends SysUser{
    @Override
    public void login(){
        System.out.println("微信一键登录方法");
    }
}
